from django.db import models

# Create your models here.

from luffy.utils.model import BaseModel


class Banner(BaseModel):
    title = models.CharField(max_length=32,verbose_name='标题')
    image = models.ImageField(upload_to='banner',verbose_name='图片')
    link = models.CharField(max_length=64,verbose_name='连接地址')
    info = models.TextField(verbose_name='详情')

    class Meta:
        db_table = 'luffy_banner'
        verbose_name='轮播图表'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.title